﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ASPItalia.ModelVirtualCasting.WPF.Models;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows;

namespace ASPItalia.ModelVirtualCasting.WPF.ViewModels
{
    public class ImageEditorViewModel : AsyncViewModel
    {

        private BitmapSource _imageSource;
        private MultimediaImage _image;

        public ImageEditorViewModel()
        {

        }

        public ImageEditorViewModel(MultimediaImage image)
        {
            _image = image;
            _imageSource = image.ImageSource;
        }

        public BitmapSource ImageSource
        {
            get { return _imageSource; }
            set
            {
                _imageSource = value;
                _image.ImageSource = value;
                OnPropertyChanged("ImageSource");
            }
        }
    }
}
